<?php
namespace Wap\Controller;
use Think\Controller;
class IndexController extends BaseController {
//class IndexController extends Controller {
	
	protected function _initialize(){
		parent::_initialize();
		
		header("Content-Type: text/html;charset=utf-8");
		$this->assign('tj',time());
		
		
	}
	   	
	public function index(){
		
		$this->display();
	}
	
	
	
	public function wo(){
		
		
		$this->display();
	}
	//发红包封装
	public function redenvelope(){

	}
	
	
//	//微信支付代码
//	public function wxpay(){
//		$options['appid']=C('BB_APPID');
//		$options['secret']=C('BB_SECRET');
//		$options['mch_id']=C('BB_MCHID');
//		$options['payKey']=C('BB_MCHPAYKEY');
//		$wx=new \bb\Wechat($options);
//		
//		$pay['openid']=$_SESSION['wxuser']['openid'];
//		$pay['body']='测试';
//		$pay['orderId']=time();
//		$pay['money']='0.01';
//		$pay['notify_url']='wx.iwantwash.com/pay';
//		$data=$wx->unifiedOrder($pay['openid'],$pay['body'],$pay['orderId'],$pay['money'],$pay['notify_url']);
//  		foreach($data as $key => $v) {
//			$str .= "{$key}={$v}&";
//		}
//		$url="http://wx.iwantwash.com/wxpay.php?$str";
//		header("Location:".$url); 
//	}
}